package com.raft.kvstore.message;

import java.io.Serializable;
import java.util.UUID;

/**get请求，传入关键字key
 * @author zhangsulei
 *
 */
public class GetCommand implements Serializable {

    /**
	 *
	 */
	private static final long serialVersionUID = -6114034300771241245L;
	private final String key;
	private final String requestId;

    public GetCommand(String key) {
    	this.requestId = UUID.randomUUID().toString();
        this.key = key;
    }

    public String getKey() {
        return key;
    }

    public String getRequestId() {
		return requestId;
	}

	@Override
    public String toString() {
        return "GetCommand{key='" + key + "', requestId='" + requestId + "'}";
    }

}
